const Router = require('koa-router');
const router = new Router();
const {db, QueryTypes} = require("../../models/db");
// 保存派单
router.post('/receipt/getBillById', async ctx => {
    let user = ctx.user
    let tenantId = user.tenantId;
    let billId = ctx.request.body.billId;
    let model = await db.query(`select * from v_main_withhx where id=${billId} and tenantId=${tenantId}`, {type:QueryTypes.SELECT, plain: true})

    return ctx.suc('', model)
})

module.exports = router;
